    FIND_PATH(OPENGLES_INCLUDE_DIR GLES/gl.h
	    /opt/vc/include
      /usr/openwin/share/include
      /opt/graphics/OpenGL/include /usr/X11R6/include
      /usr/include
    )

    FIND_LIBRARY(OPENGLES_LIBRARY
      NAMES GLES_CM GLESv1_CM
      PATHS /opt/vc/lib
      /opt/graphics/OpenGL/lib
            /usr/openwin/lib
            /usr/shlib /usr/X11R6/lib
            /usr/lib
    )

    FIND_LIBRARY(EGL_LIBRARY
	    NAMES EGL
      PATHS /opt/vc/lib
      /opt/graphics/OpenGL/lib
            /usr/openwin/lib
            /usr/shlib /usr/X11R6/lib
            /usr/lib
    )

SET (OPENGLES_LIBRARY ${OPENGLES_LIBRARY} ${EGL_LIBRARY})

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGLES DEFAULT_MSG OPENGLES_LIBRARY OPENGLES_INCLUDE_DIR)
